package com.servicio.styles;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class Styles {

  public static void textoSesion(JLabel label,int tamF) {
    label.setFont(new java.awt.Font("Arial", 0, tamF));
    label.setForeground(Color.BLUE);
  }

  public static void titulo(JLabel label,int tamF, int tamB) {
    label.setFont(new java.awt.Font("Arial", 0, tamF));
    label.setForeground(Color.BLUE);
    label.setBorder(BorderFactory.createLineBorder(Color.WHITE, tamB));
  }

  public static void boton(JButton jButton, int tF, int tB) {
    jButton.setFont(new java.awt.Font("Arial", 0, tF));
    jButton.setForeground(Color.BLUE);
    jButton.setBorder(BorderFactory.createLineBorder(Color.WHITE, tB));
  }

  public static void tamPanel(JPanel panel, int tamX, int tamY) {
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    int tamXA = (int) ((screenSize.getWidth() * tamX) / 100);
    int tamYA = (int) ((screenSize.getHeight() * tamY) / 100);
    panel.setPreferredSize(new Dimension(tamXA, tamYA));

  }
  
  public static void tamBorder(JComponent comp , int tam){
      comp.setBorder(BorderFactory.createLineBorder(Color.WHITE, tam));
  }
}
